1. Technical Field
The invention is related to software user interface windows, and in particular, to a system and method for automatically and dynamically sizing and positioning controls, including buttons, text, and other elements within a dialog window, or the like, of a computer software application.
2. Related Art
Software applications or computer programs are often run or executed in a windowing environment. Such windowing environments include, for example, any of the Windows® operating systems, or any of a number of other conventional windowing environments. Most of these conventional windowing environments commonly use dialog windows or the like to present information and receive input from a user. Dialog windows typically contain one or more controls, or groups of controls, such controls often including text or icons for informing a user as to the function of the controls.
Examples of typical controls used within a dialog window include both dynamic and static controls, such as, for example, push buttons, radio buttons, check boxes, edit boxes, text labels, list boxes, etc. For example, a dynamic control, such as a list box, may be placed in any sort of dialog window, such as a “File Open,” a “File Save,” or any other dialog window, to provide for user input or selection. Such list boxes typically contain a listing of files or documents available to the user for opening or saving. Further, dynamic controls, such as, for example, a “cancel button” also often include text on the button, i.e. the word “Cancel” on the button. Static controls, such as text labels, display organized information, such as, for example, text information, but do not, by themselves, provide for or receive user input.
One conventional method for creating dialog windows typically involves a labor-intensive process whereby every dialog box to be used by a particular application or computer program is laid out by manually specifying precise positions and dimensions of each individual control within a dialog. These positions and dimensions are typically stored as a set of resource data that is loaded by the operating system or application program whenever a particular dialog window is drawn or rendered.
If the text, language, or size of controls associated with such dialog windows is changed, a new layout for the dialog window is often required. This new layout again requires manually specifying precise positions and dimensions of each individual control within a dialog. Consequently, when translating a computer application from one language to another, such as, for example, from English to Japanese, it is frequently necessary to completely redesign many, or all, of the dialog windows associated with the translated application, as the size of any text associated with the controls of the translated dialog window is usually significantly different than the original text.
Further, because the position and dimensions of the controls within the dialog window of such schemes are fixed, resizing of such dialog windows is typically prevented. However, in cases where resizing of such dialog windows is allowed, resizing of the dialog window typically serves little purpose. For example, when the size of such a dialog window is decreased, the decrease in window size typically serves only to hide or clip portions of the controls within the dialog window. Alternatively, when the size of such a dialog window is increased, the increase in window size serves only to waste display space by creating a larger window having no information or controls within the expanded area, as the positions of the controls within the window remain fixed as noted above.
Other schemes for creating or laying out dialog windows have been developed that allow a program developer to specify the relative positions of the controls within the dialog window without specifying precise coordinates or dimensions of each control. Often, such schemes use the concept of “frames” which are disposed within the dialog window, and wherein each frame contains particular controls or other elements. At the time the dialog window is displayed (during the execution of the program to which the dialog belongs), these schemes automatically calculate the relative coordinates and dimensions of each control and then position and size the controls based on those coordinates and dimensions. Such schemes provide a way to ensure the efficient sizing and layout of the controls contained within a dialog window at the development stage of the software application to which the dialog window belongs. The sizes and layout of these controls are acted on at run time, as the dialog window is created on the user's computer. However, such systems do not allow for the dynamic resizing and repositioning of the controls within a dialog window in response to a user or system action to increase or decrease the size of the dialog window during use of the software application to which the dialog window belongs.
Still other schemes for creating or laying out dialog windows have been developed to allow a user to resize a dialog window. Such schemes expand on the aforementioned schemes to automatically reorganize the controls within the dialog window to adapt to the new dialog window size. Again, such schemes often use frames for laying out particular controls, with one or more controls again being disposed within frames which are themselves positioned within the dialog window. However, while such schemes are useful, they are limited by their inability to adapt to cases where a dialog window is horizontally resized such that controls within a particular row within the dialog window or frame will no longer fit within that row. In such cases, the controls within the row may be partially or completely clipped, so that the user is no longer able to fully view particular controls within the dialog window. Some schemes have attempted to address this issue by providing a scroll bar or the like within the dialog window to allow a user to view clipped or otherwise obscured portions of the dialog window. However, such schemes tend to degrade the user experience by requiring excessive interaction with dialog windows.
Finally, another scheme has attempted to address the problem of clipping or hiding controls when reducing the size of a dialog window. In particular, as defined by the JAVA™ 2 Platform, Standard Edition, v 1.3.1 API Specification, a “FlowLayout” class puts components, such as controls or buttons, in a row, within a user resizable “container” or dialog window. As with some of the aforementioned schemes, the JAVA™ FlowLayout scheme may use frames nested within the container to allow for relative layout of groups of controls within particular frames. If the horizontal space in the container, or frame within the container, is too small to put all the components in one row, FlowLayout automatically uses multiple rows to display the components by automatically wrapping the control or controls, as necessary to the next row. Similarly, as the container is expanded, all objects from lower rows that will fit into higher rows are automatically moved into the higher rows. Within each row, components are centered by default, and may also be either left-aligned, or right-aligned, as specified when the FlowLayout is created. However, this “FlowLayout” scheme is subject to several limitations. For example, the JAVA™ FlowLayout scheme fails to account for potential relationships between components existing within a single frame, such as, for example, text associated with a particular button or control, or related controls that should be kept together or in some sort of preferred orientation relative to each other.
Therefore, what is needed is a system and method for automatically and dynamically sizing and positioning controls, including buttons, text, and other elements within frames in a window of a computer software application as the window is resized. Further, as the size of individual controls is changed, such as when text associated with such controls is translated to another language, the system and method should automatically resize and reposition those elements within the window. In addition, such a system and method should allow for automatic repositioning of such elements with respect to predefined relationships between the elements.